
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;

namespace Anonym.Data.Entities
{
    /// <summary>
    /// 订单
    /// </summary>
    public class Ord_Base
    {
        
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public long ID { get; set; } = 0;

        /// <summary>
        /// 订单编号
        /// </summary>
        public string code { get; set; } = string.Empty;

        /// <summary>
        /// 公司Id
        /// </summary>
        public long CompanyId { get; set; } = 0;

        /// <summary>
        /// 客户id
        /// </summary>
        public long CustId { get; set; } = 0;

        /// <summary>
        /// 订单状态；0：订单取消 1：待分拣  2：分拣中  3：分拣完成  4：已签收
        /// </summary>
        public long OrderState { get; set; } = 0;

        /// <summary>
        /// 付款状态；0：未付款  1：已付款
        /// </summary>
        public long PayState { get; set; } = 0;

        /// <summary>
        /// 是否有退货；0：无  1：有
        /// </summary>
        public long IsReturn { get; set; } = 0;

        /// <summary>
        /// 商品金额(分)
        /// </summary>
        public long CommodityAmount { get; set; } = 0;

        /// <summary>
        /// 包装物金额（分）
        /// </summary>
        public long PackageAmount { get; set; } = 0;

        /// <summary>
        /// 退货金额（分）
        /// </summary>
        public long ReturnAmount { get; set; } = 0;

        /// <summary>
        /// 订单金额（分）；订单金额=商品金额+包装物金额-退货金额
        /// </summary>
        public long OrderAmount { get; set; } = 0;

        /// <summary>
        /// 删除标识；0：未删除  1：已删除
        /// </summary>
        public long Deleted { get; set; } = 0;

        /// <summary>
        /// 创建人(下单人)
        /// </summary>
        public long CreatorUserId { get; set; } = 0;

        /// <summary>
        /// 创建时间（下单时间时间）
        /// </summary>
        public DateTime CreationTime { get; set; } = new DateTime(1900,1,1);

        /// <summary>
        /// 最后一次修改人
        /// </summary>
        public long LastModifierUserId { get; set; } = 0;

        /// <summary>
        /// 最后一次修改时间
        /// </summary>
        public DateTime LastModificationTime { get; set; } = new DateTime(1900,1,1);

    }
}

